package com.zaofan.dao;

import java.sql.SQLException;

import org.apache.commons.dbutils.QueryRunner;

import com.zaofan.bean.Express;
import com.zaofan.dao.base.DaoSupportImpl;
import com.zaofan.utils.C3p0DataSourceUtils;

public class ExpressDao extends DaoSupportImpl<Express> {

	public void setStateByCarrierId(int id, int state) {
		try {
			String sql = "update express set state = " + state + " where carrierId = " + id;
			System.err.println(sql);
			QueryRunner runner = new QueryRunner(C3p0DataSourceUtils.getDataSource());
			runner.update(sql);
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}

}
